﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DapperExtensions.Mapper;
using Newtonsoft.Json;
using ZilLion.Service.Core.Domain.EntityBase.JsonConverter;

namespace ZL.CRM.CommonEntity.AccYwDetail
{
    public class ChikrXinxOpr
    {
        /// <summary>
        ///  变动时间
        /// </summary>
        [JsonConverter(typeof(ChinaDateTimeConverter))]
        public DateTime OprTime { get; set; }

        /// <summary>
        ///  操作记录流水号
        /// </summary>
        public string OprSno { get; set; }

        /// <summary>
        ///  账户id
        /// </summary>
        public long OprAccid { get; set; }

        /// <summary>
        ///  添加凭证号
        /// </summary>
        public string OprCardno { get; set; }

        /// <summary>
        ///  操作类型：1-实体卡卡号 2-微信accid+'|'+openid 4-手机号 5-动态凭证号 6-微信membershipno
        /// </summary>
        public short OprCtype { get; set; }

        /// <summary>
        ///  维护前信息
        /// </summary>
        public string OprXinxBef { get; set; }

        /// <summary>
        ///  维护后信息
        /// </summary>
        public string OprXinxAft { get; set; }

        /// <summary>
        ///  操作记录：业务发生地点id(分支机构)
        /// </summary>
        public int OprBrid { get; set; }

        /// <summary>
        ///  操作记录：业务发生地点名称(分支机构)
        /// </summary>
        public string OprBrname { get; set; }

        /// <summary>
        ///  操作记录：业务执行人id(员工id)
        /// </summary>
        public int OprId { get; set; }

        /// <summary>
        ///  操作记录：业务执行人名称
        /// </summary>
        public string OprName { get; set; }

    }
    public class ChikrXinxOprMapper : ClassMapper<ChikrXinxOpr>
    {
        public ChikrXinxOprMapper()
        {
            Table("#ChikrXinxOpr");
            Map(f => f.OprTime).Column("Oprtime");
            Map(f => f.OprSno).Column("OprSno");
            Map(f => f.OprAccid).Column("OprAccid");
            Map(f => f.OprCardno).Column("OprCardno");
            Map(f => f.OprCtype).Column("OprCtype");
            Map(f => f.OprXinxBef).Column("Oprxinxbef");
            Map(f => f.OprXinxAft).Column("Oprxinxaft");
            Map(f => f.OprBrid).Column("Oprbrid");
            Map(f => f.OprBrname).Column("Oprbrname");
            Map(f => f.OprId).Column("Oprid");
            Map(f => f.OprName).Column("Oprname");

        }

    }
}
